import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import routes from "./router/routes";
import {createRouter, createWebHistory} from "vue-router";
import microApps from "./micro-apps";


let router = null;
let instance = null;
function render(props = {}) {
  const { container } = props;
  router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: routes
  })

  instance = createApp(App)

  instance.use(createPinia())
  instance.use(router)

  instance.mount('#app')
  microApps.register()
  microApps.start()
}
render();
